/*******************************************************************************
 Configuration Information:
 Repository: Integrity Source
 Name      : $RCSfile: AR_CD_ActvnMgr.h $
 Version   : $Revision: 1.10 $
 Author    : $Author: Jack Jin (JinC5) $
 Date      : $Date: 2018/09/14 18:33:10IST $
 Location  : $ProjectName: /Steering/Projects/Geely/CMA_DP/PR48756_LVS_ENG_APP_Geely_CMA_EPS_DP_SYS_HRoom_AP/30_Software/3040_Design/S2-Application/01-Development/V00-Mainline/04-Components/ActiveReturn_Ear/Source/project.pj $
********************************************************************************

   ZF Friedrichshafen AG owns the copyright in this document and associated
   documents and all rights are reserved.  These documents must
   not be used for any purpose other than that for which they
   are supplied and must not be copied in whole or in part or
   disclosed to others without prior written consent of ZF Friedrichshafen AG.
   Any copy of this drawing or document made by any method
   must also include a copy of this legend.

   (C) ZF Friedrichshafen AG 2018

*******************************************************************************/
/**************************************************************************************************\
 *** 
 *** Simulink model       : AR_CD_ActvnMgr_tl
 *** TargetLink subsystem : AR_CD_ActvnMgr_tl
 *** Codefile             : AR_CD_ActvnMgr.h
 ***
 *** Generated by TargetLink, the dSPACE production quality code generator
 *** Model version: 1.621
 *** Generation date: 2018-09-14 11:00:39
 ***
 *** CODE GENERATOR OPTIONS:
 *** Code generation mode                     : AUTOSAR
 *** AUTOSAR version                          : 4.2.2
 *** Compiler                                 : <unknown>
 *** Target                                   : Generic
 *** ANSI-C compatible code                   : yes
 *** Code Optimization                        : enabled
 *** Constant style                           : decimal
 *** Clean code option                        : enabled
 *** Logging mode                             : Do not log anything
 *** Code Coverage                            : disabled
 *** Generate empty conditional branches      : disabled
 *** Loop unroll threshold                    : 5
 *** Shift mode                               : automatic
 *** Handle unscaled SF expr. with TL type    : enabled
 *** Assignment of conditions                 : AllBooleanOutputs 
 *** Scope reduction only to function level   : disabled
 *** Exploit ranges if not erasable           : disabled
 *** Exploit Compute Through Overflow         : never
 *** Linker sections                          : enabled
 *** Enable Assembler                         : disabled
 *** Variable name length                     : unlimited
 *** Use global bitfields                     : disabled
 *** Stateflow: use of bitfields              : enabled
 *** State activity encoding limit            : 8
 *** Omit zero inits in restart function      : disabled
 *** Share functions between TL subsystems    : disabled
 *** Generate 64bit functions                 : disabled
 *** Inlining Threshold                       : 6
 *** Line break limit                         : 100
 *** Target optimized boolean data type       : enabled
 *** Keep saturation elements                 : disabled
 *** Extended variable sharing                : disabled
 *** Extended lifetime optimization           : enabled
 *** Style definition file                    : C:\Program Files\dSPACE TargetLink 4.2\Matlab\Tl\Con
 ***                                            fig\codegen\cconfig.xml
 *** Root style sheet                         : C:\Program Files\dSPACE TargetLink 4.2\Matlab\Tl\XML
 ***                                            \CodeGen\Stylesheets\TL_CSourceCodeSS.xsl
 ***
 *** TargetLink version      : 4.2p2 from 27-Nov-2017
 *** Code generator version  : Build Id 4.2.0.33 from 2017-11-28 14:39:24

\**************************************************************************************************/

#ifndef AR_CD_ACTVNMGR_H
#define AR_CD_ACTVNMGR_H

/*----------------------------------------------------------------------------*\
  DEFINES (OPT)
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  INCLUDES
\*----------------------------------------------------------------------------*/

#include "Rte_Type.h"

/*----------------------------------------------------------------------------*\
  ENUMS
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  DEFINES
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  TYPEDEFS
\*----------------------------------------------------------------------------*/

struct tAR_CD_ActvnMgr_tag {
   Float32 EarActvn;
   Float32 EarRampFac;
   Boolean EarARBActvnReq;
   Float32 EarRackPosnCtrlErrSign;
};

struct tAR_CD_ActvnMgr_ActvnGain_tag {
   Boolean EarDampgRqrd;
   Boolean EarUnredAcv;
   Float32 EarActvnUnfild;
   Float32 EarActvn;
};

struct tAR_CD_ActvnMgr_InpSigVer_tag {
   Boolean RackAbsPosnQfSts;
   Boolean RackVQfSts;
   Boolean FildVehSpdQfSts;
   Boolean ColTqQfSts;
   Boolean EarInpSigVer;
};

struct tAR_CD_ActvnMgr_RampFac_tag {
   Boolean EarRampUp;
   Boolean EarEnabled;
   Boolean EarRampDown;
   Boolean EarWaitingForArbitration;
   Boolean EarDisabled;
};

/*----------------------------------------------------------------------------*\
  VARIABLES
\*----------------------------------------------------------------------------*/

/******************************************************************************\
   VC_STRUCT_InitAtDef: Used for global struct variables. Initialised at definition. Creates access 
   functions (get and set). | Width: N.A.
\******************************************************************************/
extern struct tAR_CD_ActvnMgr_tag var_AR_CD_ActvnMgr;

extern struct tAR_CD_ActvnMgr_ActvnGain_tag var_AR_CD_ActvnMgr_ActvnGain;

extern struct tAR_CD_ActvnMgr_InpSigVer_tag var_AR_CD_ActvnMgr_InpSigVer;

extern struct tAR_CD_ActvnMgr_RampFac_tag var_AR_CD_ActvnMgr_RampFac;

/*----------------------------------------------------------------------------*\
  PARAMETERIZED MACROS
\*----------------------------------------------------------------------------*/
/*----------------------------------------------------------------------------*\
  FUNCTION PROTOTYPES
\*----------------------------------------------------------------------------*/

/******************************************************************************\
   GLOBAL_FCN: global function(s) (exported to other modules)
\******************************************************************************/
extern void AR_CD_ActvnMgr(mmPerSec ArRackVDmdRaw, mmPerSec RackVCmbnd, tArbitrationState
    ARBArGatewySt, tQualityFactor RackAbsPosnQF, tQualityFactor RackVQF, tQualityFactor
    FildVehSpdQF, tQualityFactor ColTqQF, Float32 EarActvnUnfild, Float32 EarActvnRedUnfild);

extern void AR_CD_ActvnMgr_ActvnGain(Float32 EarActvnUnfild, Float32 EarActvnRedUnfild, mmPerSec
    RackVCmbnd, mmPerSec ArRackVDmdRaw);

extern void AR_CD_ActvnMgr_InpSigVer(tQualityFactor RackAbsPosnQF, tQualityFactor RackVQF,
    tQualityFactor FildVehSpdQF, tQualityFactor ColTqQF);

extern void AR_CD_ActvnMgr_RampFac(tArbitrationState ARBArGatewySt, Boolean EarInpSigVer);

/******************************************************************************\
   GlobalLookup1D_AR_CD_04: Derived TL_CG default function class.
\******************************************************************************/
extern float32 Tab1DnMS3I2T3126_AR_CD_04(uint8 Nx, const float32 * x_table, const float32 * z_table,
     float32 x);

#endif /* AR_CD_ACTVNMGR_H */
/*----------------------------------------------------------------------------*\
  END OF FILE
\*----------------------------------------------------------------------------*/
